/**
 * 
 */
package org.jenkon.io.filter;

import java.io.File;
import java.io.Serializable;
import java.util.Date;

/**
 * abstract {@link FileFilter} class to filter the last modified of file.
 * 
 * @author Jens Konopka
 * 
 */
abstract class AbstractLastModifiedFileFilter implements FileFilter, Serializable {

	/**
	 * 
	 */
	private static final long serialVersionUID = 1779889279187459424L;
	private final long millis;

	/**
	 * @param millis Milliseconds
	 */
	public AbstractLastModifiedFileFilter(final long millis) {
		this.millis = millis;
	}

	/**
	 * @param date Modified Date
	 */
	public AbstractLastModifiedFileFilter(final Date date) {
		this(date.getTime());
	}

	/**
	 * @param reference referenced File with last Modified Date.
	 */
	public AbstractLastModifiedFileFilter(final File reference) {
		this(reference.lastModified());
	}

	/**
	 * @return the millis
	 */
	protected final long getMillis() {
		return millis;
	}
}
